package com.twu.biblioteca.core;

import com.twu.biblioteca.util.Cli;

public abstract class Option {
    private String description;
    protected Cli cli;

    protected Option(String description, Cli cli) {
        this.description = description;
        this.cli = cli;
    }

    public String getDescription() {
        return description;
    }

    public abstract void execute();

    public String displayOption(int optionIndex) {
        StringBuilder result = new StringBuilder();
        result.append(optionIndex);
        result.append(":");
        result.append(getDescription());
        result.append("\n");
        return result.toString();
    }
}
